package com.futureCloudMOM.controller.core.web.basic;

import com.futureCloudMOM.common.core.page.TableDataInfo;
import com.futureCloudMOM.controller.core.controller.BaseApiController;
import com.futureCloudMOM.core.domain.BasicWorkCenter;
import com.futureCloudMOM.core.service.BasicWorkCenterService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 文件名 BasicWorkCenterController
 *
 * @since 2023/6/6 14:48
 */
@Api(tags = "工作中心")
@RestController
@RequestMapping("basic/work_center")
public class BasicWorkCenterController extends BaseApiController<BasicWorkCenter, BasicWorkCenter, BasicWorkCenterService> {

    public BasicWorkCenterController(BasicWorkCenterService service) {
        super(service);
    }


    @ApiOperation("根据编码和名称查询数据")
    @PostMapping("/getListByCodeOrName")
    public TableDataInfo getListByCodeOrName(@RequestBody BasicWorkCenter basicWorkCenter){
        startPage();
        return getDataTable(service.getListByCodeOrName(basicWorkCenter));
    }

}
